package com.yougong.api.enums;

import com.yougong.common.api.IErrorCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * ErrorEnum
 * @description error类型枚举类
 */
@Getter
@AllArgsConstructor
public enum ErrorEnum implements IErrorCode {
    // 系统错误
    UNKNOWN(500,"系统内部错误，请联系管理员"),
    PATH_NOT_FOUND(404,"路径不存在，请检查路径"),
    NO_AUTH(403,"没有权限，请联系管理员"),
    DUPLICATE_KEY(501,"数据库中已存在该记录"),
    TOKEN_GENERATOR_ERROR(502,"token生成失败"),
    NO_UUID(503,"uuid为空"),
    SQL_ILLEGAL(504,"sql非法"),

    //用户权限错误
    INVALID_TOKEN(1001,"token不合法"),
    INVALID_USERNAME(1002,"用户名已存在"),
    INVALID_USERNAME_NULL(1003,"用户名不存在"),
    INVALID_PHONE_NULL(1004,"用户不存在，请点击注册"),
    INVALID_CUST_CORP_INFO(1005,"账户认证中"),
    INVALID_PHONE_INFO_EXITS(1006,"手机号已注册"),
    INVALID_PASSWORD(1007,"用户名或密码错误"),
    USERINFO_FREEZE(1008,"账户已被冻结"),
    USERINFO_NOT_PASS(1008,"账号未认证"),
    USERINFO_NO_PASS(1009,"账号认证未通过"),
    WRONG_PASSWORD(1010,"密码错误"),

    //登录模块错误
    LOGIN_FAIL(10001,"登录失败"),
    LOGIN_FAIL1(10011,"请登陆！"),
    CAPTCHA_WRONG(10002,"验证码错误"),
    USERNAME_OR_PASSWORD_WRONG(10003,"用户名或密码错误"),
    PHONE_USER_NULL(10004,"手机号不存在"),
    LOGIN_TIME_OUT(10005,"登录超时"),
    PHONE_NOT_REGISTER(10006,"该手机号未注册，请先注册"),
    CARTNO_EXIST(10007, "身份证号已存在"),

    // 请求错误
    REQUEST_ARGUMENTS_EMPTY(30001,"请求参数不能为空"),
    REQUEST_ARGUMENTS_EXITES(30002,"请求参数已存在"),
    REQUEST_ARGUMENTS_ERROR(30011,"请求参数错误"),
    REQUEST_FILE_EMPTY(30003,"文件为空"),
    REQUEST_FILE_ERROR(30004,"上传文件失败"),
    REQUEST_LOGIN_CODE_EMPTY(30005,"短信验证码不能为空"),
    REQUEST_LOGIN_PHONE_EMPTY(30006,"手机号不能为空"),
    REQUEST_LOGIN_CODE_ERROR(30007,"短信验证码错误"),
    REQUEST_SEND_CODE_ERROR(30008,"短信发送失败"),
    REQUEST_SEND_PHONE_EMPTY(30009,"手机号不能为空"),
    REQUEST_FILE_NOT_FOUND(30010,"文件未找到"),
    REQUEST_PC_LOGIN_CODE_ERROR(30012,"验证码错误"),
    REQUEST_DRIVER_EXITS(30013,"司机信息已添加"),
    REQUEST_PHONE_EXITS(30014,"该手机号已存在"),
    REQUEST_PRODUCT_EXITS(30015,"该产品名称已存在"),
    REQUEST_CONTENT_EXITS(30016,"发送消息不能为空"),

    // 数据库错误
    INSERT_DB_ERROR(40001, "数据库数据插入失败"),

    //APP热更新
    UPGRADE_VERSION_ERROR(150001, "版本错误"),
    APP_LATEST_VERSION_NOT_EXISTS(150001, "App最新版本不存在"),

    //配置信息
    SYSCONFIG_EXISTS(160001, "配置信息已存在"),

    //用户操作错误
    INSUFFICIENT_BALANCE(6001,"积分不足，请到前台兑换"),
    ACTIVITY_FULL(6002,"活动人数已满"),
    FORBID_DELETE_YOURSELF(6003,"禁止删除自己"),
    ACTIVITY_OVER(6004,"活动已结束"),
    ACTIVITY_CANCEL(6005,"活动已取消"),
    PHONE_ILLEGAL(6006,"手机号不合法"),
    USER_NULL(6007,"用户不存在"),
    NOT_DATE(6008,"日期应该在此时之后"),
    BEFORE_TIME(6009,"该时间段内已有人预约"),
    AFTER_TIME(6010,"结束时间已被预约"),
    NOT_ROOM(6011,"房间id不存在"),
    NOT_ORDER(6012,"订单id不存在"),
    NOT_USER(6013,"用户id不存在"),
    ERROR_TIME(6014,"预约时间应该在此时之后"),
    NOT_ADMIN(6015,"admin用户不存在"),
    NOT_TIME(6016,"预约时间错误"),
    SIGNED_IN(6017,"今日已签到"),
    NOT_ACTIVITY(6019,"该活动下存在用户参加无法删除"),
    NOT_USER_EMAIL(6020,"用户名错误或邮箱错误"),
    INSUFFICIENT_AUTHORITY(6021,"权限不足"),
    NOT_ACTIVITY_ID(6022,"活动id错误"),
    NOT_TINE_START_END(6023,"开始时间应该在结束时间之后"),
    NOT_DOCTOR_TIME(6024,"此时间段没有医生坐诊"),
    HAVING_DOCTOR_INFO(6025,"此时间有人预约"),
    NOT_DOCTOR_DATE(6026,"该天没有医生坐诊"),
    NOT_CUSDOCTORINFO_ID(6027,"医生预约信息id不存在"),
    NOT_TIME_ERROR(6028,"开始时间应该大于当前时间"),
    NOT_ROLE_ID(6029,"角色id不能为空"),
    RECORD_EXPIRED(6030,"记录已经过期，无法修改"),
    NOT_ADMIN_ID(6031,"该用户不是管理员，无法添加权限"),
    NOT_DOCTOR_ID(6032,"医生id不存在"),
    NOT_TIME_REPEAT(6033,"时间段重复"),
    NOT_EMAIL(6034,"没有该邮箱"),
    NOT_CACHE_ID(6035,"缓存id错误"),
    NOT_ID(6036,"id不存在"),
    REGISTRATION_FAILED(6037,"注册失败"),
    SPACE_MORE(6038,"最大车位应该大于被占用车位"),
    LIKE_OK(6039,"已点赞"),
    LIKE_NOT(6040,"还未点赞"),
    NOT_MESSAGE_ID(6041,"心愿id错误"),
    ILLEGAL_REQUEST(6042,"非法请求"),
    NOT_EMAIL_CODE(6043,"邮箱验证码错误"),
    NOT_CAN_ACTIVITY_OVER(6044,"活动已经结束，不能取消"),
    NOT_CAN_OVER(6045,"成功预约，不能取消"),
    NOT_NUMBERPLATE(6046,"没有车牌号"),
    SHARED(6047,"已经分享过了");


    private long code;
    private String message;
}
